 CHECKLIST #
# optimization flags are on
# avg is in all directories
# thru is a sufficient value
#

echo "Did you remember to update svn?"
echo "Did you make sure the program avg is in this directory?"
echo "Did you check the iteration value 'thru'?"
echo "DID YOU MAKE SURE AVG IS COMPILED ON THIS MACHINE?"
echo "DID YOU MAKE SURE ALL TEST PROGRAMS ARE COMPILED ON THIS MACHINE?"

#!/bin/sh
thru=15;
thru2=15;

`rm -rf log_results`
`mkdir log_results`

######## LOG RESULTS SECTION ########
enum=8;
dir=log_results;
`echo "mult log w: $enum through 26" > $dir/avg_mult`
`echo "" >> $dir/avg_mult`
`echo "div log w: $enum through 26" > $dir/avg_div`
`echo "" >> $dir/avg_div`

echo "Beginning test on log tables"

while [ $enum -le 26 ]; do

enum2=1;
while [ $enum2 -le $thru ]; do
  `./gf_basic_tester $enum logtable 100 >> $dir/tmp_results_log_w$enum`
  enum2=`echo $enum2 | awk '{printf $1+1}'`
done

`cat $dir/tmp_results_log_w$enum | grep "Mega Multiplies" | awk '{printf $4 "\n"}' > $dir/results_log_multiply_w$enum`
`cat $dir/tmp_results_log_w$enum | grep "Mega Divides" | awk '{printf $4 "\n"}' > $dir/results_log_divide_w$enum`

`cat $dir/results_log_multiply_w$enum | ./avg >> $dir/avg_mult`
`cat $dir/results_log_divide_w$enum | ./avg >> $dir/avg_div`

`rm $dir/tmp_results_log_w$enum`

enum=`echo $enum | awk '{printf $1+1}'`
done
`rm $dir/results_*`
echo "Finished test on log tables"

